export default function(data, id, cb){
  let i = 0;
  data.some((val,idx)=>{
    i = idx;
    return val.id === id;
  })

  cb( i );

  localStorage.setItem("cartData", JSON.stringify(data));
}